package com.cloud.lan.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.cloud.lan.dao.LanBookingActivityRecordMapper;
import com.cloud.lan.entity.model.dataobject.LanBookingActivityRecordDO;
import com.cloud.lan.service.ILanBookingActivityService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by zhouquan on 2022/5/21.
 */
@Slf4j
@Service
public class LanBookingActivityServiceImpl implements ILanBookingActivityService{

    @Resource
    private LanBookingActivityRecordMapper lanBookingActivityRecordMapper;


    @Override
    public List<LanBookingActivityRecordDO> queryAllUserACR(Long activityId) {
        LambdaQueryWrapper<LanBookingActivityRecordDO> larQw = new LambdaQueryWrapper<>();
        larQw.eq(LanBookingActivityRecordDO::getActivityId,activityId);
        larQw.eq(LanBookingActivityRecordDO::getIsDeleted,0);
        larQw.orderByDesc(LanBookingActivityRecordDO::getId);
        return lanBookingActivityRecordMapper.selectList(larQw);
    }
}
